package com.hb.core.pojo.flow.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hb.core.pojo.flow.entity.FlowTempFormField;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 流程表单信息(模板) Mapper 接口
 * </p>
 *
 * @author zhaojk
 * @since 2021-05-27
 */
public interface FlowTempFormFieldMapper extends BaseMapper<FlowTempFormField> {

    /**
     * 查询指定流程模板的表单字段
     *
     * @param tempMainId
     * @return
     */
    @Select("select `id`,`form_id`,`temp_main_id`,`field_code`,`field_name`,`field_type`,`sort_num` " +
            "from work_flow_temp_form_field where delete_flag=0 and `temp_main_id`=#{`temp_main_id`} " +
            "order by `sort_num`")
    List<FlowTempFormField> getFieldsByTempMainId(Long tempMainId);
}
